include Makefile.global

SOURCE = src
EXEC   = $(shell ls $(SOURCE))

all:
	@($(CD) $(SOURCE); \
	for dir in $(EXEC); \
	do \
		$(CD) $$dir; \
		$(MAKE); \
		$(CD) ..; \
	done)

# Display quick help
help:
	@($(ECHO) "To compil everithing : make"; \
	  $(ECHO) "To compil x          : make x"; \
	  $(ECHO) "To apply y to x      : make x.y"; \
	  $(ECHO) ""; \
	  $(ECHO) "   Example : kernel_methods.show"; \
	  $(ECHO) ""; \
	  $(ECHO) "Easy ?";)

mrproper:
	@($(CD) $(SOURCE); \
	for dir in $(EXEC); \
	do \
		$(CD) $$dir; \
		$(MAKE) $@; \
		$(CD) ..; \
	done)

%:
	@($(CD) $(SOURCE)/$(basename $@); \
		$(MAKE) $(subst .,,$(suffix $@)))
